<!--
  @author mujunlin
  @since 2019/08/15 10:59
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:replace="common/common :: jscss"/>
</head>
<body>
<div class="layui-fluid">

    <blockquote class="layui-crumb">组织关系&nbsp;>
        <a lay-href="/company/list.action">公司管理</a>&nbsp;&nbsp;>
        <zmn th:text="${(company.companyId == null||company.companyId == 0) ? '新增公司':company.name}">新增或修改公司</zmn>
    </blockquote>

    <div class="layui-card">
        <div th:replace="company/_tab::tab"></div>
        <div class="layui-card-body">
            <form method="POST" action="" class="layui-form" lay-filter="zmn-company-form"  enctype="multipart/form-data">
                <!--用于保存或传值的隐藏表单元素
                                 置于form标签内的最上方
                                 -->
                <input type="hidden" th:value="${company.companyId}" name="companyId"/>
                    <div class="layui-card-header layui-margin-b"><b>法人信息</b></div>
                    <div class="layui-form-item">
                        <label class="layui-form-label layui-form-required">法人姓名：</label>
                        <div class="layui-input-inline" style="width:436px">
                            <input type="text" name="legalPersonName" placeholder="法人姓名" lay-verify="required"
                                   lay-verType="tips"  th:value="${company.legalPersonName}"
                                   autocomplete="off" class="layui-input" maxlength="20"/>
                        </div>
                        <span class="layui-form-mid layui-word-aux">姓名必须和身份证一致</span>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label layui-form-required">法人身份证号：</label>
                        <div class="layui-input-inline" style="width:436px">
                            <input type="text" name="legalPersonIdcard" placeholder="法人身份证号" lay-verify="idCard|required"
                                   lay-verType="tips" th:value="${company.legalPersonIdcard}"
                                   autocomplete="off" class="layui-input" maxlength="20"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">身份证：</label>
                        <div class="layui-input-inline">
                            <div class="layui-upload-drag" id="legalPersonIdcardFrontimgDiv">
                                <input type="hidden" id="legalPersonIdcardFrontimg" name="legalPersonIdcardFrontimg">
                                <i class="layui-icon"></i>
                                <p>点击上传，身份证人像面</p>
                            </div>
                            <div style="line-height: 2;text-align: center">正面</div>
                        </div>

                        <div class="layui-input-inline">
                            <div class="layui-upload-drag" id="legalPersonIdcardBackimgDiv">
                                <input type="hidden" id="legalPersonIdcardBackimg" name="legalPersonIdcardBackimg">
                                <i class="layui-icon"></i>
                                <p>点击上传，身份证国徽面</p>
                            </div>
                            <div style="line-height: 2;text-align: center">背面</div>
                        </div>


                    </div>


                    <div class="layui-card-header layui-margin-b"><b>营业执照</b></div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">纳税人识别号：</label>
                        <div class="layui-input-inline" style="width:436px">
                            <input type="text" name="taxpayerIdentityNum" placeholder="纳税人识别号" lay-verify="numAndAZ"
                                   lay-verType="tips" th:value="${company.taxpayerIdentityNum}"
                                   autocomplete="off" class="layui-input" maxlength="20"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">营业执照：</label>
                        <div class="layui-input-inline">
                            <div class="layui-upload-drag" id="businessLicenseImg1Div">
                                <input type="hidden" id="businessLicenseImg1" name="businessLicenseImg1">
                                <i class="layui-icon"></i>
                                <p>点击上传，营业执照图片</p>
                            </div>
                            <div style="line-height: 2;text-align: center">营业执照1</div>
                        </div>

                        <div class="layui-input-inline">
                            <div class="layui-upload-drag" id="businessLicenseImg2Div">
                                <input type="hidden" id="businessLicenseImg2" name="businessLicenseImg2">
                                <i class="layui-icon"></i>
                                <p>点击上传，营业执照图片</p>
                            </div>
                            <div style="line-height: 2;text-align: center">营业执照2</div>
                        </div>

                        <div class="layui-input-inline">
                            <div class="layui-upload-drag" id="businessLicenseImg3Div">
                                <input type="hidden" id="businessLicenseImg3" name="businessLicenseImg3">
                                <i class="layui-icon"></i>
                                <p>点击上传，营业执照图片</p>
                            </div>
                            <div style="line-height: 2;text-align: center">营业执照3</div>
                        </div>
                    </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button  lay-submit="" lay-filter="zmn-company-form-submit" class="layui-btn next"  th:if="${#authPermit.checkPermit('/company/addEdit.action')}" id="subBtn">提交</button>
                    <button type="button" class="layui-btn-primary layui-btn cancleBtn">取消</button>
                </div>
            </div>
            </form>
        </div>



    </div>
</div>
<script type="text/javascript" th:inline="javascript">
    let json = {
        company: [[${company}]]
    };

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        art_company_material: "company/zmn.art.company.material",
    }).use(['index', 'art_company_material']);

</script>
</body>
</html>